﻿using System;
using System.Data;
using DMS.Business.Modules.SystemManagement;
using DMS.Business.Modules.Knowledge;
using DMS.Business.Utility;

namespace DMS.Web.Modules.Home
{
    public partial class Index : System.Web.UI.Page
    {
        public int todoItemCount = 0;
        public int doneItemCount = 0;
        public int delayCount = 0;
        public int warningCount = 0;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataSet ds = NoticeService.ListNotice(10, 1, 0,"");
                rptNotices.DataSource = ds;
                rptNotices.DataBind();

                DataSet ds2 = KnowledgeService.ListTopKnowledge();
                rtpKnowledges.DataSource = ds2;
                rtpKnowledges.DataBind();

                if (!SystemContext.Current.LoginUser.IsInRole("档案管理员;系统管理员;"))
                {
                    this.submenuh2_3.Visible = false;
                    this.div_submenuh2_3.Visible = false;
                }
    
            }

            if(Session["inited"] == null){
                ClientHelper.Instance.RenderScript(Page, null, "init()");
                Session["inited"] = true;
            }
        }
    }
}